<?php

namespace lico\Tool\Encrypt;

class Md5
{

    public function __construct()
    {
    }

    /**
     * 配置
     */
    public $config = [
        'salt' => 'lico',
    ];

    /**
     * 加密
     */
    public function encript($str)
    {

        $result = md5(md5($str) . $this->config['salt']);

        return $result;
    }

    /**
     * 校验
     */
    public function verify($str, $encrypt)
    {

        $actcript = $this->encript($str);

        return $result = $actcript == $encrypt ? true : false;
    }
}
